using System;
using Crm.Domain.TestUtil;
using Crm.Domain.TestUtil.ObjectMothers;
using NUnit.Framework;

namespace Crm.Domain.Tests
{
    [TestFixture]
    public class AddressCityTests
    {
        #region Tests

        [Test]
        public void PropertyTest()
        {
            Address address = CreateAddress(AddressCommonTestValues.City);

            Assert.AreEqual(AddressCommonTestValues.City, address.City);
        }

        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void CannotBeNull()
        {
            CreateAddress(null);
        }

        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void CannotBeEmpty()
        {
            CreateAddress(String.Empty);
        }

        #endregion

        #region Support Methods

        private Address CreateAddress(string city)
        {
            return AddressObjectMother.CreateWithCity(city);
        }

        # endregion
    }
}
